﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="EM.admin.Menu.Default" %>

<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="radA" %>
<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="radG" %>
<%@ Register Src="~/Common/PageName.ascx" TagName="PageName" TagPrefix="uc1" %>
<%@ Register Src="~/Common/Header.ascx" TagName="Header" TagPrefix="uc2" %>
<%@ Register Src="~/Common/Footer.ascx" TagName="Footer" TagPrefix="uc4" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link runat="server" id="linkCss" rel="stylesheet" href="~/css/master.css" type="text/css" />
    <link runat="server" id="linkcssbuttons" rel="stylesheet" href="~/css/buttons.css"
        type="text/css" />
    <script src="../../js/PopUp.js" type="text/javascript"></script>
    <script type="text/javascript">
        var rgMaster;

        var rgMaster;

        function GridCreated() {
            rgMaster = this;
            if (rgMaster.MasterTableView.Rows.length) {
                rgMaster.MasterTableView.SelectRow(rgMaster.MasterTableView.Rows[0].Control, true);
            }
        }
        function btnInsert_OnClick() {
            openWin('Default_edit.aspx?task=Insert&ID=-1', '', 1, 950, 350);
        }
        function btnUpdate_OnClick(ID) {
            openWin('Default_edit.aspx?task=Update&ID=' + ID, '', 1, 950, 350);
        }

        function btnDelete_OnClick(ID) {
            openWin('Default_edit.aspx?task=Delete&ID=' + ID, '', 1, 950, 350);
        }

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
        <tr>
            <td class="TdMainTop">
                <uc2:Header ID="Header1" runat="server"></uc2:Header>
            </td>
        </tr>
        <tr>
            <td class="TdMainContent" valign="top">
                <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="TdPageName" colspan="2">
                            <uc1:PageName ID="ucPageName" SHOWBOOKMARKBUTTON="true" PAGEID="6" runat="server"
                                PAGEWIDTH="1200"></uc1:PageName>
                        </td>
                    </tr>
                    <tr>
                        <td id="TdMainRight" valign="top">
                            <div id="ContentRight">
                                <div id="GrdDivMaster">
                                    <radG:RadGrid ID="rgMaster" runat="server" Skin="master" GridLines="None" PageSize="20"
                                        AllowPaging="True" AllowSorting="True" Width="1200px" AutoGenerateColumns="False"
                                        EnableAJAX="true" ShowStatusBar="true" OnNeedDataSource="rgMaster_NeedDataSource"
                                        LoadingTemplateTransparency="55" EnableAJAXLoadingTemplate="True" OnItemDataBound="rgMaster_ItemDataBound"
                                        OnPageIndexChanged="rgMaster_PageIndexChanged">
                                        <PagerStyle Mode="NumericPages" />
                                        <ClientSettings Selecting-AllowRowSelect="false">
                                        </ClientSettings>
                                        <MasterTableView GridLines="None">
                                            <Columns>
                                                <radG:GridBoundColumn UniqueName="MENUNAME" DataField="MENUNAME" HeaderText="Sayfa">
                                                    <HeaderStyle HorizontalAlign="left" Width="250" />
                                                    <ItemStyle HorizontalAlign="left" />
                                                </radG:GridBoundColumn>
                                                <radG:GridBoundColumn UniqueName="TYPE" DataField="TYPE" HeaderText="Sayfa Tipi">
                                                    <HeaderStyle HorizontalAlign="left" Width="60" />
                                                </radG:GridBoundColumn>
                                                <radG:GridBoundColumn UniqueName="STATUS" DataField="STATUS" HeaderText="Durum">
                                                    <HeaderStyle HorizontalAlign="left" Width="30" />
                                                </radG:GridBoundColumn>
                                                <radG:GridBoundColumn UniqueName="PAGEID" DataField="PAGEID" HeaderText="PAGEID">
                                                    <HeaderStyle HorizontalAlign="left" Width="30" />
                                                </radG:GridBoundColumn>
                                                <radG:GridBoundColumn UniqueName="PAGEORDER" DataField="PAGEORDER" HeaderText="Sırası">
                                                    <HeaderStyle HorizontalAlign="left" Width="100" />
                                                </radG:GridBoundColumn>
                                                <radG:GridBoundColumn UniqueName="PAGEURL" DataField="PAGEURL" HeaderText="URL">
                                                    <HeaderStyle HorizontalAlign="left" Width="250" />
                                                </radG:GridBoundColumn>
                                                <radG:GridBoundColumn UniqueName="STARTDATE" DataField="STARTDATE" HeaderText="Başlangıç Tarihi"
                                                    DataFormatString="{0: dd/MM/yyy}">
                                                    <HeaderStyle HorizontalAlign="left" Width="60" />
                                                </radG:GridBoundColumn>
                                                <radG:GridBoundColumn UniqueName="ENDDATE" DataField="ENDDATE" HeaderText="Bitiş Tarihi"
                                                    DataFormatString="{0: dd/MM/yyy}">
                                                    <HeaderStyle HorizontalAlign="left" Width="60" />
                                                </radG:GridBoundColumn>
                                                <%--<radG:GridBoundColumn UniqueName="CONTENTNAME" DataField="CONTENTNAME" HeaderText="İçerik">
                                                        <HeaderStyle HorizontalAlign="left" Width="80"/>
                                                    </radG:GridBoundColumn>--%>
                                                <radG:GridBoundColumn UniqueName="DISPLAYMENU" DataField="DISPLAYMENU" HeaderText="Görünür">
                                                    <HeaderStyle HorizontalAlign="left" Width="30" />
                                                </radG:GridBoundColumn>
                                                <radG:GridTemplateColumn HeaderText="İşlemler" UniqueName="Edit">
                                                    <HeaderStyle HorizontalAlign="left" Width="130" />
                                                    <ItemStyle HorizontalAlign="left" Wrap="false" />
                                                    <ItemTemplate>
                                                        <div style="white-space: nowrap;">
                                                            <span id="spEdit" runat="server"><a id="btnEdit" runat="server">Düzenle</a></span>
                                                            <span id="spFunction" runat="server">| <a id="btnFunction" runat="server">Fonk.</a></span>
                                                            <span id="spSection" runat="server">| <a id="btnSection" runat="server">Sect.</a></span>
                                                        </div>
                                                    </ItemTemplate>
                                                </radG:GridTemplateColumn>
                                            </Columns>
                                        </MasterTableView>
                                    </radG:RadGrid>
                                </div>
                            </div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="vertical-align: bottom;" class="MasterFooter">
                <uc4:Footer ID="Footer1" runat="server"></uc4:Footer>
            </td>
        </tr>
    </table>
    <radA:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <radA:AjaxSetting AjaxControlID="btnSearch">
                <UpdatedControls>
                    <radA:AjaxUpdatedControl ControlID="rgMaster" />
                </UpdatedControls>
            </radA:AjaxSetting>
        </AjaxSettings>
    </radA:RadAjaxManager>
    </form>
</body>
</html>
